<%@page import="lbsproject.processaudit.model.WorkRegion"%>
<%@page import="web.lbsproject.processaudit.model.WorkRegion4Web"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!-- Begin: WEB-INF/template/taskManage/addTask/workRegion.jsp -->
<p class="form-item">
<strong>新增任务分区</strong>
</p>
<form class = "form" action="AddWorkRegion" method="post">
	<p class="form-item">

	<label class="item-t" for="regionName">分区名：</label><input type="text" name="regionName" value="" id="regionName" /> <input type="submit" class="btn search-btn text_add" value="添加" id="search"/>
	</p>				
	<p class="form-item">
		<label class = "text_add">注意：不能与已存在的分区重名</label>
	</p>
</form>
<br/>
<ul class="tab-nav">
	<li class="current">&nbsp;已添加的任务分区&nbsp; </li>
</ul>
<!-- show existed work regions -->
<div class="tab-content">
	<table class="table">
		<thead>
			<tr>
				<th width="20%">分区名称</th>
			</tr>
		</thead>
		<tbody>
		<%
		@SuppressWarnings("unchecked")
		List<WorkRegion> workRegions  = 
			(List<WorkRegion>)request.getAttribute("workRegions");
		if (workRegions  != null) {
			for (WorkRegion region: workRegions) {
		%>
			<tr>
				<td><%=region.getName() %></td>
			</tr>
		<%
			}
		}
		%>
		</tbody>
	</table>
</div>
<!-- End -->